package com.server.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author
 * @since 2020-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CmsArticle对象", description="文章表")
public class CmsArticle implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "文章编号")
    @TableId(value = "article_id", type = IdType.AUTO)
    private Integer articleId;

    @ApiModelProperty(value = "类目编号")
    private Integer categoryId;

    @ApiModelProperty(value = "文章标题")
    private String title;

    @ApiModelProperty(value = "文章原作者")
    private String author;

    @ApiModelProperty(value = "封面图")
    private String image;

    @ApiModelProperty(value = "关键字")
    private String keywords;

    @ApiModelProperty(value = "简介")
    private String description;

    @ApiModelProperty(value = "实体对象id")
    private Integer itemId;

    @ApiModelProperty(value = "位置")
    private Integer position;

    @ApiModelProperty(value = "类型(1:普通,2:热门...)")
    private Integer type;

    @ApiModelProperty(value = "是否允许评论(0:不允许,1:允许)")
    private Integer allowComments;

    @ApiModelProperty(value = "状态(-1:不通过,0未审核,1:通过)")
    private Integer status;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "发布人id")
    private Integer userId;

    @ApiModelProperty(value = "阅读数量")
    private Integer readNumber;

    @ApiModelProperty(value = "置顶等级")
    private Integer top;

    @ApiModelProperty(value = "排序")
    private Integer orders;

    @ApiModelProperty(value = "显示时间")
    private Date showTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;

    @ApiModelProperty(value = "是否启用")
    private Integer enable;

    @ApiModelProperty(value = "逻辑删除字段0删除1为删除")
    private Integer deleted;

    @ApiModelProperty(value = "版本")
    @Version
    @JsonIgnore
    private Integer version;


}
